package com.stargis.ftpdown;



import cn.hutool.http.HttpUtil;

import java.nio.charset.Charset;
import java.util.HashMap;

public class test {

    public static void main(String[] args){
        HashMap<String, Object> param = new HashMap<>();
        param.put("address", "哈尔滨道33号");
        param.put("addressName", "");
        String baseurl="http://localhost:8200/SitusLocation/Geocoding";

        // 拼接请求字符串
        //String fullUrl = HttpUtil.ge("", param);
        String fullurl =HttpUtil.urlWithForm(baseurl, param,Charset.forName("UTF-8"),true);

        // 发起GET请求
        String  result = HttpUtil.get(fullurl);
                //HttpUtil.createGet("http://localhost:8200/SitusLocation/Geocoding")
                //.form(param) // 将参数加入到URL中
                //.execute()       // 执行请求
                //.body();         // 获取响应内容
        System.out.println(result);
    }
}
